WPF自定义Button样式(按钮长度随Content长度自适应) 代码如下: View Code 效果如下图: 当内容变长时: 使用到的知识: 1. StackPanel:用来控制Button的位置,可以设置居中 ...